from car_rental.caw.base_request import BaseRequest
"""
封装用户管理模块
"""

#注册的代码块
def register(url,test_request,cs):
    """
    :param url: 测试环境
    :param test_request: BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+"/futureloan/mvc/api/member/register"
    r=test_request.post(url,data=cs)
    return r

#登录的代码块
def login(url,test_request,cs):
    """
    :param url: 测试环境
    :param test_request: BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+"/futureloan/mvc/api/member/login"
    r=test_request.post(url,data=cs)
    return r

#充值的代码块
def recharge(url,test_request,cs):
    """
    :param url: 测试环境
    :param test_request: BaseRequest的实例
    :param cs: 请求参数
    :return: 注册接口的响应
    """
    url=url+"/futureloan/mvc/api/member/recharge"
    r=test_request.post(url,data=cs)
    return r



if __name__ == '__main__':
    register("http://192.168.151.6:8080",BaseRequest(),{
    "mobilephone":"",
    "pwd":123456})